{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}F:\fiscal research\mayor\PSRM data\PSRM_descstat3_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}19 Dec 2023, 09:59:24
{txt}
{com}. 
. ** Log file for Analysis: Table B.2 **
. 
. 
. 
. ** Table B.2
. 
. gen panel=1
{txt}
{com}. bysort geo_fips: egen panel_count=total(panel)
{txt}
{com}. bysort state_fips: egen state_city_count=total(panel)
{txt}
{com}. bysort state_fips: egen state_mayor_pres_count=total(panel) if mayor_pres_party==1
{txt}(4783 missing values generated)

{com}. bysort state_fips: egen state_sec_mayor_pres_count=total(panel) if strong_mayor_pres_party==1
{txt}(7132 missing values generated)

{com}. bysort state_fips: egen state_mayor_pres_gov_count=total(panel) if mayor_pres_gover_party==1
{txt}(6603 missing values generated)

{com}. bysort state_fips: egen state_sec_may_pres_gov_cnt=total(panel) if str_mayor_pres_gover_party==1
{txt}(7791 missing values generated)

{com}. 
. 
. foreach x in state_city_count state_mayor_pres_count state_sec_mayor_pres_count state_mayor_pres_gov_count state_sec_may_pres_gov_cnt{c -(}
{txt}  2{com}.         replace `x' = 0 if missing(`x')
{txt}  3{com}. {c )-}
{txt}(0 real changes made)
(4,783 real changes made)
(7,132 real changes made)
(6,603 real changes made)
(7,791 real changes made)

{com}. 
. 
. foreach x in state_city_count state_mayor_pres_count state_sec_mayor_pres_count state_mayor_pres_gov_count state_sec_may_pres_gov_cnt{c -(}
{txt}  2{com}.         egen `x'_max = max(`x'), by(state_fips)
{txt}  3{com}. {c )-}
{txt}
{com}. 
. foreach x in state_city_count_max state_mayor_pres_count_max state_sec_mayor_pres_count_max state_mayor_pres_gov_count_max state_sec_may_pres_gov_cnt_max{c -(}
{txt}  2{com}.         replace `x' = 0 if missing(`x')
{txt}  3{com}. {c )-}
{txt}(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

{com}. 
. drop state_city_count state_mayor_pres_count state_sec_mayor_pres_count state_mayor_pres_gov_count state_sec_may_pres_gov_cnt
{txt}
{com}. 
. rename (*_max) (*)
{res}{txt}
{com}. 
. 
. 
. tab primary_place_of_performance_sta mayor_pres_party, freq 

{txt}primary_place_of_perf {c |}   mayor_pres_party
   ormance_state_name {c |}         0          1 {c |}     Total
{hline 22}{c +}{hline 22}{c +}{hline 10}
              ALABAMA {c |}{res}        73         55 {txt}{c |}{res}       128 
{txt}               ALASKA {c |}{res}        14          2 {txt}{c |}{res}        16 
{txt}              ARIZONA {c |}{res}       105        119 {txt}{c |}{res}       224 
{txt}             ARKANSAS {c |}{res}        34         32 {txt}{c |}{res}        66 
{txt}           CALIFORNIA {c |}{res}       842        536 {txt}{c |}{res}     1,378 
{txt}             COLORADO {c |}{res}       100         87 {txt}{c |}{res}       187 
{txt}          CONNECTICUT {c |}{res}        90         86 {txt}{c |}{res}       176 
{txt}             DELAWARE {c |}{res}         8          8 {txt}{c |}{res}        16 
{txt} DISTRICT OF COLUMBIA {c |}{res}         8          8 {txt}{c |}{res}        16 
{txt}              FLORIDA {c |}{res}       348        267 {txt}{c |}{res}       615 
{txt}              GEORGIA {c |}{res}        75         70 {txt}{c |}{res}       145 
{txt}                IDAHO {c |}{res}        21         23 {txt}{c |}{res}        44 
{txt}             ILLINOIS {c |}{res}       256        202 {txt}{c |}{res}       458 
{txt}              INDIANA {c |}{res}       120        120 {txt}{c |}{res}       240 
{txt}                 IOWA {c |}{res}        76         82 {txt}{c |}{res}       158 
{txt}               KANSAS {c |}{res}        57         47 {txt}{c |}{res}       104 
{txt}             KENTUCKY {c |}{res}        34         30 {txt}{c |}{res}        64 
{txt}            LOUISIANA {c |}{res}        44         54 {txt}{c |}{res}        98 
{txt}                MAINE {c |}{res}         4          7 {txt}{c |}{res}        11 
{txt}             MARYLAND {c |}{res}        34         28 {txt}{c |}{res}        62 
{txt}        MASSACHUSETTS {c |}{res}       145        127 {txt}{c |}{res}       272 
{txt}             MICHIGAN {c |}{res}       183        159 {txt}{c |}{res}       342 
{txt}            MINNESOTA {c |}{res}       187         95 {txt}{c |}{res}       282 
{txt}          MISSISSIPPI {c |}{res}        16         12 {txt}{c |}{res}        28 
{txt}             MISSOURI {c |}{res}        83         62 {txt}{c |}{res}       145 
{txt}              MONTANA {c |}{res}        29         19 {txt}{c |}{res}        48 
{txt}             NEBRASKA {c |}{res}        34         30 {txt}{c |}{res}        64 
{txt}               NEVADA {c |}{res}        43         53 {txt}{c |}{res}        96 
{txt}        NEW HAMPSHIRE {c |}{res}        23          9 {txt}{c |}{res}        32 
{txt}           NEW JERSEY {c |}{res}       109         96 {txt}{c |}{res}       205 
{txt}           NEW MEXICO {c |}{res}        34         27 {txt}{c |}{res}        61 
{txt}             NEW YORK {c |}{res}        96        112 {txt}{c |}{res}       208 
{txt}       NORTH CAROLINA {c |}{res}       158        102 {txt}{c |}{res}       260 
{txt}         NORTH DAKOTA {c |}{res}        21         11 {txt}{c |}{res}        32 
{txt}                 OHIO {c |}{res}       117        111 {txt}{c |}{res}       228 
{txt}             OKLAHOMA {c |}{res}        56         38 {txt}{c |}{res}        94 
{txt}               OREGON {c |}{res}        84         67 {txt}{c |}{res}       151 
{txt}         PENNSYLVANIA {c |}{res}        72         72 {txt}{c |}{res}       144 
{txt}         RHODE ISLAND {c |}{res}        36         28 {txt}{c |}{res}        64 
{txt}       SOUTH CAROLINA {c |}{res}        33         31 {txt}{c |}{res}        64 
{txt}         SOUTH DAKOTA {c |}{res}        10         21 {txt}{c |}{res}        31 
{txt}            TENNESSEE {c |}{res}        80         70 {txt}{c |}{res}       150 
{txt}                TEXAS {c |}{res}       401        334 {txt}{c |}{res}       735 
{txt}                 UTAH {c |}{res}        99         57 {txt}{c |}{res}       156 
{txt}             VIRGINIA {c |}{res}        80         69 {txt}{c |}{res}       149 
{txt}           WASHINGTON {c |}{res}       126         98 {txt}{c |}{res}       224 
{txt}            WISCONSIN {c |}{res}        77         56 {txt}{c |}{res}       133 
{txt}              WYOMING {c |}{res}         8          8 {txt}{c |}{res}        16 
{txt}{hline 22}{c +}{hline 22}{c +}{hline 10}
                Total {c |}{res}     4,783      3,837 {txt}{c |}{res}     8,620 
{txt}
{com}. 
. 
. tabstat mayor_pres_party, by(primary_place_of_performance_sta) stat(n) // column 3

{txt}Summary for variables: mayor_pres_party
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}      128
{txt}{ralign 32:ALASKA} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}      224
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}       66
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}     1378
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}      187
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}      176
{txt}{ralign 32:DELAWARE} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:DISTRICT OF COLUMBIA} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}      615
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}      145
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}       44
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}      458
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}      240
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}      158
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}      104
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}       64
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}       98
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}       62
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}      272
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}      342
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}      282
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}      145
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}       48
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res}       64
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}       96
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res}       32
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}      205
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}       61
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}      208
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}      260
{txt}{ralign 32:NORTH DAKOTA} {...}
{c |}{...}
 {res}       32
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}      228
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}       94
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}      151
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}      144
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}       64
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res}       64
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}       31
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}      150
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}      735
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}      156
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}      149
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}      224
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}      133
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}       16
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}     8620
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. tabstat mayor_pres_party if mayor_pres_party==1, by(primary_place_of_performance_sta) stat(n) // column 4

{txt}Summary for variables: mayor_pres_party
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}       55
{txt}{ralign 32:ALASKA} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}      119
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}       32
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}      536
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}       87
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}       86
{txt}{ralign 32:DELAWARE} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:DISTRICT OF COLUMBIA} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}      267
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}       70
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}       23
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}      202
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}      120
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}       82
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}       47
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}       30
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}       54
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}      127
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}      159
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}       95
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res}       12
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}       62
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}       19
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res}       30
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}       53
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res}        9
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}       96
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}       27
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}      112
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}      102
{txt}{ralign 32:NORTH DAKOTA} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}      111
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}       38
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}       67
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}       72
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res}       31
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}       21
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}       70
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}      334
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}       57
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}       69
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}       98
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}       56
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}        8
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}     3837
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. tabstat mayor_pres_party if strong_mayor_pres_party==1, by(primary_place_of_performance_sta) stat(n) // column 5

{txt}Summary for variables: mayor_pres_party
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}       18
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}       34
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}      223
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}       33
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}       24
{txt}{ralign 32:DISTRICT OF COLUMBIA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}      119
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}       21
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}       86
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}       20
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}       22
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}       82
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}       57
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}       32
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res}        3
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}       35
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}       48
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}       31
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}       39
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}       13
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}       38
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}      176
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}       32
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}       24
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}       48
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}       26
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}        8
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}     1488
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. tabstat mayor_pres_party if mayor_pres_gover_party==1, by(primary_place_of_performance_sta) stat(n) // column 6

{txt}Summary for variables: mayor_pres_party
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}       34
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}       35
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}       24
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}      330
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}       48
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}       61
{txt}{ralign 32:DELAWARE} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}      106
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}       29
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}      102
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}       59
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}       25
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}       24
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}       20
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}       92
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}       44
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}       68
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}       55
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}       17
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res}       12
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}       18
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}       12
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}       96
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}       45
{txt}{ralign 32:NORTH DAKOTA} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}       39
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}       19
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}       41
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}       36
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}       12
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}       22
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}      247
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}       47
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}       26
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}       62
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}        4
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}     2017
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. tabstat mayor_pres_party if str_mayor_pres_gover_party==1, by(primary_place_of_performance_sta) stat(n) // column 7

{txt}Summary for variables: mayor_pres_party
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}       12
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}      150
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}       19
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}       46
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}        3
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}       54
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}        3
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}        3
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}       61
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}       23
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}       31
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}       24
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}        9
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}      130
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}       28
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}       40
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}        4
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}      829
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. 
. bysort geo_fips: keep if _n==1 // * Count city list: 569
{txt}(8,051 observations deleted)

{com}. 
. gen city=1
{txt}
{com}. 
. bysort state_fips: egen city_count=total(city) // 
{txt}
{com}. 
. gen city_count_rat=city_count/569
{txt}
{com}. 
. 
. tabstat city_count, by(primary_place_of_performance_sta) stat(n) // column 1

{txt}Summary for variables: city_count
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}         N
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res}        8
{txt}{ralign 32:ALASKA} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res}        5
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res}       90
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res}       13
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res}       11
{txt}{ralign 32:DELAWARE} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:DISTRICT OF COLUMBIA} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res}       41
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res}       29
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}       15
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res}        7
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res}        1
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res}        5
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res}       19
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res}       23
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res}       20
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res}        3
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res}       13
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res}       13
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res}       18
{txt}{ralign 32:NORTH DAKOTA} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res}       16
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res}        6
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res}        9
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res}        4
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res}        2
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res}       48
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res}       10
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res}       14
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res}        9
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res}        1
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res}      569
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. tabstat city_count_rat, by(primary_place_of_performance_sta) stat(mean) // column 2

{txt}Summary for variables: city_count_rat
{col 6}by categories of: primary_place_of_performance_sta (primary_place_of_performance_state_name)

{ralign 32:primary_place_of_performance_sta} {...}
{c |}      mean
{hline 33}{c +}{hline 10}
{ralign 32:ALABAMA} {...}
{c |}{...}
 {res} .0140598
{txt}{ralign 32:ALASKA} {...}
{c |}{...}
 {res} .0017575
{txt}{ralign 32:ARIZONA} {...}
{c |}{...}
 {res} .0246046
{txt}{ralign 32:ARKANSAS} {...}
{c |}{...}
 {res} .0087873
{txt}{ralign 32:CALIFORNIA} {...}
{c |}{...}
 {res} .1581722
{txt}{ralign 32:COLORADO} {...}
{c |}{...}
 {res} .0228471
{txt}{ralign 32:CONNECTICUT} {...}
{c |}{...}
 {res} .0193322
{txt}{ralign 32:DELAWARE} {...}
{c |}{...}
 {res} .0017575
{txt}{ralign 32:DISTRICT OF COLUMBIA} {...}
{c |}{...}
 {res} .0017575
{txt}{ralign 32:FLORIDA} {...}
{c |}{...}
 {res} .0720562
{txt}{ralign 32:GEORGIA} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:IDAHO} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:ILLINOIS} {...}
{c |}{...}
 {res} .0509666
{txt}{ralign 32:INDIANA} {...}
{c |}{...}
 {res}  .026362
{txt}{ralign 32:IOWA} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:KANSAS} {...}
{c |}{...}
 {res} .0123023
{txt}{ralign 32:KENTUCKY} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:LOUISIANA} {...}
{c |}{...}
 {res} .0123023
{txt}{ralign 32:MAINE} {...}
{c |}{...}
 {res} .0017575
{txt}{ralign 32:MARYLAND} {...}
{c |}{...}
 {res} .0087873
{txt}{ralign 32:MASSACHUSETTS} {...}
{c |}{...}
 {res} .0333919
{txt}{ralign 32:MICHIGAN} {...}
{c |}{...}
 {res} .0404218
{txt}{ralign 32:MINNESOTA} {...}
{c |}{...}
 {res} .0351494
{txt}{ralign 32:MISSISSIPPI} {...}
{c |}{...}
 {res} .0035149
{txt}{ralign 32:MISSOURI} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:MONTANA} {...}
{c |}{...}
 {res} .0052724
{txt}{ralign 32:NEBRASKA} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:NEVADA} {...}
{c |}{...}
 {res} .0105448
{txt}{ralign 32:NEW HAMPSHIRE} {...}
{c |}{...}
 {res} .0035149
{txt}{ralign 32:NEW JERSEY} {...}
{c |}{...}
 {res} .0228471
{txt}{ralign 32:NEW MEXICO} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:NEW YORK} {...}
{c |}{...}
 {res} .0228471
{txt}{ralign 32:NORTH CAROLINA} {...}
{c |}{...}
 {res} .0316344
{txt}{ralign 32:NORTH DAKOTA} {...}
{c |}{...}
 {res} .0035149
{txt}{ralign 32:OHIO} {...}
{c |}{...}
 {res} .0281195
{txt}{ralign 32:OKLAHOMA} {...}
{c |}{...}
 {res} .0105448
{txt}{ralign 32:OREGON} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:PENNSYLVANIA} {...}
{c |}{...}
 {res} .0158172
{txt}{ralign 32:RHODE ISLAND} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:SOUTH CAROLINA} {...}
{c |}{...}
 {res} .0070299
{txt}{ralign 32:SOUTH DAKOTA} {...}
{c |}{...}
 {res} .0035149
{txt}{ralign 32:TENNESSEE} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:TEXAS} {...}
{c |}{...}
 {res} .0843585
{txt}{ralign 32:UTAH} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:VIRGINIA} {...}
{c |}{...}
 {res} .0175747
{txt}{ralign 32:WASHINGTON} {...}
{c |}{...}
 {res} .0246046
{txt}{ralign 32:WISCONSIN} {...}
{c |}{...}
 {res} .0158172
{txt}{ralign 32:WYOMING} {...}
{c |}{...}
 {res} .0017575
{txt}{hline 33}{c +}{hline 10}
{ralign 32:Total} {...}
{c |}{...}
 {res} .0534746
{txt}{hline 33}{c BT}{hline 10}

{com}. 
. 
. 
. 
.  
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}F:\fiscal research\mayor\PSRM data\PSRM_descstat3_log.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}19 Dec 2023, 09:59:25
{txt}{.-}
{smcl}
{txt}{sf}{ul off}